package com.lungle.warmdiary.app.model;

import com.lungle.warmdiary.R;
import com.lungle.warmdiary.app.view.active.fragment.ActiveDetailPagerFragment;
import com.lungle.warmdiary.app.view.active.fragment.ActiveForceFragment;
import com.lungle.warmdiary.app.view.active.fragment.ActivityCommentDetailFragment;
import com.lungle.warmdiary.app.view.active.fragment.ActivityCommentDetailFragment2;
import com.lungle.warmdiary.app.view.active.fragment.CommentDetailScreenShotFragment;
import com.lungle.warmdiary.app.view.active.fragment.CommentScreenShotFragment;
import com.lungle.warmdiary.app.view.active.fragment.ExcuteScreenShotFragment;
import com.lungle.warmdiary.app.view.active.fragment.MyActiveFragment;
import com.lungle.warmdiary.app.view.active.fragment.status.ActiveFragment;
import com.lungle.warmdiary.app.view.me.fragment.AddFriendNumFragment;
import com.lungle.warmdiary.app.view.me.fragment.AddIconFragment;
import com.lungle.warmdiary.app.view.me.fragment.ChangeWechatNicknameFragment;
import com.lungle.warmdiary.app.view.me.fragment.ChangeWidFragment;
import com.lungle.warmdiary.app.view.me.fragment.MediaAddFragment;
import com.lungle.warmdiary.app.view.me.fragment.MediaAddResultFragment;
import com.lungle.warmdiary.app.view.me.fragment.MediaCenterFragment;
import com.lungle.warmdiary.app.view.me.fragment.SelectIndustryFragment;
import com.lungle.warmdiary.app.view.me.fragment.SelectTagFragment;
import com.lungle.warmdiary.app.view.me.fragment.TesterApplyFragment;
import com.lungle.warmdiary.app.view.me.fragment.TesterStatFragment;
import com.lungle.warmdiary.app.view.me.fragment.UserProfileFragment;
import com.lungle.warmdiary.app.view.message.fragment.MessageCenterFragment;
import com.lungle.warmdiary.app.view.settings.fragment.AboutFragment;
import com.lungle.warmdiary.app.view.settings.fragment.BrowserFragment;
import com.lungle.warmdiary.app.view.testcampaign.fragment.CampaignCommentDetailFragment;
import com.lungle.warmdiary.app.view.testcampaign.fragment.CampaignCommentFragment;
import com.lungle.warmdiary.app.view.testcampaign.fragment.CampaignDetailPagerFragment;
import com.lungle.warmdiary.app.view.wallet.fragment.AccountCenterFragment;
import com.lungle.warmdiary.app.view.wallet.fragment.BindAccountFragment;
import com.lungle.warmdiary.app.view.wallet.fragment.TradeRecordFragment;
import com.lungle.warmdiary.app.view.wallet.fragment.UserWalletFragment;
import com.lungle.warmdiary.app.view.wallet.fragment.WithDrawRecordFragment;
import com.lungle.warmdiary.app.view.wallet.fragment.WithdrawCenterFragment;


public enum SimpleBackPage {

    ABOUT(1, R.string.actionbar_title_about, AboutFragment.class),
    EXCUTE_SCREENSHOT(2, R.string.actionbar_title_execute, ExcuteScreenShotFragment.class),
    MESSAGE(3, R.string.actionbar_title_message, MessageCenterFragment.class),
    WALLET(4, R.string.actionbar_title_walllet, UserWalletFragment.class),
    TAKECASH_RECORD(5, R.string.actionbar_title_takecash_record, WithDrawRecordFragment.class),
    TRADE_RECORD(6, R.string.actionbar_title_wallet_record, TradeRecordFragment.class),
    TAKECASH_CENTER(7, R.string.actionbar_title_takecash_center, WithdrawCenterFragment.class),
    MEDIA_CENTER(8, R.string.actionbar_title_user_center, MediaCenterFragment.class),
    MEDIA_ACCOUNT_ADD_RESULT(9, R.string.actionbar_title_user_add, MediaAddResultFragment.class),
    ACCOUNT_CENTER(10, R.string.actionbar_title_account_center, AccountCenterFragment.class),
    ACCOUNT_BIND(11, R.string.actionbar_title_account_bind, BindAccountFragment.class),
    ACTIVE_DETAIL(12, R.string.actionbar_title_account_bind, ActiveDetailPagerFragment.class),
    REGISTER_PROTOCOL(13, R.string.actionbar_title_browser, BrowserFragment.class),
    COMMENT_DETAI_SCREENSHOT(14, R.string.actionbar_title_active_detail, CommentDetailScreenShotFragment.class),
    COMMENT_SCREENSHOT(15, R.string.actionbar_title_comment, CommentScreenShotFragment.class),
    SELECT_TAG(18, R.string.actionbar_title_comment, SelectTagFragment.class),
    MY_ACTIVE_LIST(17, R.string.actionbar_title_my_actives, MyActiveFragment.class),
    MEDIA_ACCOUNT_ADD(19, R.string.actionbar_title_user_add, MediaAddFragment.class),
    USERPROFILE_SETTING(20, R.string.actionbar_title_user_profile, UserProfileFragment.class),
    WECAHT_FRIENDS_SELECT(22, R.string.actionbar_title_wechat_friend, AddFriendNumFragment.class),
    WECAHT_NAME_SELECT(24, R.string.actionbar_title_wechat, ChangeWidFragment.class),
    WECAHT_USERNAME_CHANGE(25, R.string.actionbar_title_wechat_nickname, ChangeWechatNicknameFragment.class),
    ACTIVE_LIST(26, R.string.actionbar_title_my_actives, ActiveFragment.class),
    ACTIVE_FORCE_LIST(27, R.string.actionbar_title_my_actives, ActiveForceFragment.class),
    WECAHT_ICON_SELECT(28, R.string.actionbar_title_wechat_icon, AddIconFragment.class),


    CAMPAIGNDETAIL(29, R.string.actionbar_title_campaign_detail, CampaignDetailPagerFragment.class),
    CAMPAIGNCOMMENT(30,R.string.actionbar_title_campaign_comment, CampaignCommentFragment.class),
    CAMPAIGNCOMMENT_DETAIL(31, R.string.actionbar_title_campaign_comment_detail, CampaignCommentDetailFragment.class),
    TESTER_STAT(32, R.string.actionbar_title_browser_apply, TesterStatFragment.class),
    TESTER_APPLY(33, R.string.actionbar_title_tester_apply, TesterApplyFragment.class),
    TESTER_INDUSTRY(34, R.string.actionbar_title_tester_industry, SelectIndustryFragment.class),
    ACTIVITY_COMMENT_DETAIL(35, R.string.actionbar_title_campaign_comment_detail, ActivityCommentDetailFragment.class),
    ACTIVITY_COMMENT_DETAIL2(36, R.string.actionbar_title_campaign_comment_detail, ActivityCommentDetailFragment2.class);


    private int title;
    private Class<?> clz;
    private int value;

    private SimpleBackPage(int value, int title, Class<?> clz) {
        this.value = value;
        this.title = title;
        this.clz = clz;
    }

    public static SimpleBackPage getPageByValue(int val) {
        for (SimpleBackPage p : values()) {
            if (p.getValue() == val)
                return p;
        }
        return null;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public int getTitle() {
        return title;
    }

    public void setTitle(int title) {
        this.title = title;
    }

    public Class<?> getClz() {
        return clz;
    }

    public void setClz(Class<?> clz) {
        this.clz = clz;
    }
}
